package com.tank4.tank;

import javax.swing.*;

public class TankGame04 extends JFrame {
    private MyPanel mp=null;

    //主函数
    public static void main(String[] args) {
        new TankGame04();
    }
    //
    public TankGame04(){
        mp=new MyPanel();
        Thread thread = new Thread(mp);
        thread.start();
        this.add(mp);//添加画板
        this.addKeyListener(mp);//让JFrame监听mp的键盘事件
        this.setSize(1000,750);
        this.setVisible(true);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
}
